#include <stdio.h>
#include "math_lib.h"

int main() {
  int a = 20, b = 5;

  // 调用动态库中的函数
  print_greeting();

  printf("测试数学运算：\n");
  printf("%d + %d = %d\n", a, b, add(a, b));
  printf("%d - %d = %d\n", a, b, subtract(a, b));
  printf("%d * %d = %d\n", a, b, multiply(a, b));
  printf("%d / %d = %.2f\n", a, b, divide(a, b));

  // 测试错误情况
  printf("\n测试错误处理：\n");
  printf("%d / %d = %.2f\n", a, 0, divide(a, 0));

  return 0;
}
